package com.jxzn.locust.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Data;

@Component
@Data
public class FileUploadConfig {

    @Value("${upload.home.path}")
    String uploadFolder;
    @Value("${upload.home.url}")
    String fileUrl;
    @Value("${upload.image.format}")
    String imageFormat;

    public String getAbsPath(String url) {
        return url.replace(fileUrl, uploadFolder);
    }
}
